import React, { useState } from "react";
import { Form, Button, Uploader } from "@nutui/nutui-react";
import styles from "./index.module.scss";

function Index() {
  const [form] = Form.useForm();

  const handleClick = () => {
    Taro.navigateTo({
      url: "pages/contactInfo/index",
    });
  };

  return (
    <div className={styles.container}>
      <Form
        form={form}
        labelPosition="top"
        footer={
          <>
            <Button nativeType="submit" block type="primary" onClick={handleClick}>
              下一步
            </Button>
          </>
        }
      >
        <div className={styles.card}>
          <Form.Item label="征信报告" required name="files">
            <Uploader
              capture
              url="https://my-json-server.typicode.com/linrufeng/demo/posts"
            ></Uploader>
          </Form.Item>
          <Form.Item label="房产信息" name="filesA">
            <Uploader
              capture
              url="https://my-json-server.typicode.com/linrufeng/demo/posts"
            ></Uploader>
          </Form.Item>
          <Form.Item label="车辆信息" name="filesB">
            <Uploader
              capture
              url="https://my-json-server.typicode.com/linrufeng/demo/posts"
            ></Uploader>
          </Form.Item>
          <Form.Item label="保单" name="filesC">
            <Uploader
              capture
              url="https://my-json-server.typicode.com/linrufeng/demo/posts"
            ></Uploader>
          </Form.Item>
          <Form.Item label="银行流水证明" name="filesD">
            <Uploader
              capture
              url="https://my-json-server.typicode.com/linrufeng/demo/posts"
            ></Uploader>
          </Form.Item>
        </div>
      </Form>
    </div>
  );
}

export default Index;
